package com.ang.mybatisplus.base.service.impl;

import com.ang.mybatisplus.base.entity.User;
import com.ang.mybatisplus.base.mapper.UserMapper;
import com.ang.mybatisplus.base.service.UserService;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;
import java.util.Map;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author ssang
 * @since 2021-05-10
 */
@Service
public class UserServiceImpl extends ServiceImpl<UserMapper, User> implements UserService {

    @Resource
    private UserMapper userMapper;

    @Override
    public IPage<User> getUserPage(Page page, QueryWrapper wrapper) {
        return userMapper.selectPage(page, wrapper);
    }

    @Override
    public IPage<User> getUserPageXml(Page page,User user) {
        return userMapper.selectPageXml(page,user);
    }

    @Override
    public List<User> listUserByMap(Map<String,String> map) {
        return userMapper.listUserByMap(map);
    }

    @Override
    public List<User> listByUserParam(User user) {
        return userMapper.listByUserParam(user);
    }

    @Override
    public List<User> listByNameParam(String username) {
        return userMapper.listByNameParam(username);
    }

    @Override
    public List<User> listByUserNoParam(User user) {
        return userMapper.listByUserNoParam(user);
    }

}
